package com.test.example.controller.log;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;



@RestController
public class LogController {

    @RequestMapping("/log1")
    public String log1(@RequestParam(name = "param") String param) {
        if (param.equals("1")) return "成功返回";
        else throw new RuntimeException("测试日志");
    }

    @GetMapping("/log2")
    public String log2(@RequestParam(name = "param") String param) {
        if (param.equals("1")) return "成功返回";
        else throw new RuntimeException("测试日志");
    }
}
